package com.platform.common.bean;

import com.platform.common.menus.ResultCodeEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * describe:全局自定义错误
 * @author Administrator
 * @date 2019/12/15
 * @Time 11:07
 */
@Getter
@Setter
public class BaseException extends RuntimeException {

    private Integer code;

    private String message;

    public BaseException(ResultCodeEnum resultCode) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMessage();
    }

    public BaseException(ResultCodeEnum resultCode,String message) {
        this.code = resultCode.getCode();
        this.message = message;
    }
}
